package com.cy.aircompressor.main.ui.other.provider;

import android.content.Context;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

import com.cy.aircompressor.databinding.ItemWarningLayoutBinding;
import com.cy.aircompressor.databinding.ItemWarningModelLayoutBinding;
import com.cy.aircompressor.entity.compressor.CompressorType;
import com.cy.aircompressor.entity.warning.WarningMsg;
import com.drug.lib.view.recycptr.ItemViewBinder;
import com.net.model.base.BaseBindViewHolder;

import java.text.DecimalFormat;

public class ModelProvider extends ItemViewBinder<CompressorType, ModelProvider.ViewHolder> {
    Context mContext;

    public ModelProvider(Context mContext) {
        this.mContext = mContext;
    }

    @NonNull
    @Override
    protected ModelProvider.ViewHolder onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent) {
        return new ViewHolder(ItemWarningModelLayoutBinding.inflate(inflater, parent, false));
    }

    @Override
    protected void onBindViewHolder(@NonNull ModelProvider.ViewHolder holder, @NonNull CompressorType entity) {
        holder.mBinding.serial.setText(holder.getLayoutPosition() + "");
        holder.mBinding.model.setText(entity.getModel());
    }

    public class ViewHolder extends BaseBindViewHolder<ItemWarningModelLayoutBinding> {

        protected ViewHolder(ItemWarningModelLayoutBinding itemView) {
            super(itemView);
        }
    }


}
